const express = require('express');
const cors = require('cors');
const router = require('./router/index.js')


const app = express();

app.use(express.static('public'))

app.use(express.json());       //# 解析json编码数据
app.use(express.urlencoded()); //# 解析url编码的数据
app.use(cors());

app.use(router.requestLJQ)

app.use('/api', router)

const server = app.listen('9520', () => {
    var host = server.address().address
    var port = server.address().port
    console.log('Your server is running...', "localhost:" + port)
})


